<?php
namespace Home\Controller;
use Think\Controller;

class FeedBackController extends Controller {
    public function feedback(){
        $this->display();       
    }
    public function dofeedback(){
        
        require_once LIB_PATH. 'custom/securimage/securimage.php';
        $securimage = new\ Securimage();
        $captcha=I('post.captcha');   
       if ($securimage->check($captcha) == false){
        $this->error('验证码错误','feedback');
       }else{           
           $modelFeedBack=new \Home\Model\FeedBackModel();
           $modelFeedBack=D('feed_back');
           $modelFeedBack->register($_POST['title'],$_POST['email'],$_POST['body']);
           $this->success('提交成功','feedback');
          }                   
    }
}